drop table if exists bri_depart;
create table bri_depart(
id int PRIMARY key auto_increment,
code varchar(20) default '' comment '部门编码',
name varchar(30) default '' comment '部门名称',
parent_code varchar(20) default '' comment '部门父节点',
org_pk  varchar(40) default '' comment '组织PK',
tenant varchar(20) default '' comment '租户ID',
ts timestamp not null default current_timestamp on update current_timestamp
);

drop table if exists bri_user;
create table bri_user(
id int PRIMARY key auto_increment,
user_id varchar(64) default '' comment '用户ID',
user_name varchar(50) default '' comment '用户名称',
org_pk varchar(64) default '' comment '组织PK',
email varchar(64) default '' comment '邮箱',
phone varchar(20) default '' comment '手机号',
is_admin tinyint default 0 comment '是否是管理员',
dept_pk varchar(64) default '' comment '部门PK',
dept_name varchar(300) default '' comment '部门名称',
user_code varchar(64) default '' comment '用户编码' ,
valid tinyint default 1 comment '是否可用（在职） 1在职 0离职',
pcode varchar(64) default '' comment '用户员工编号',
id_number varchar(32) default '' comment '身份证号',
tenant varchar(20) default '' comment '租户ID',
ts timestamp not null default current_timestamp on update current_timestamp
);

drop table if exists bri_tenant;
create table bri_tenant(
id int PRIMARY key auto_increment,
code varchar(20) default '' comment '租户ID',
name varchar(50) default '' comment '租户名称',
type varchar(10) default '' comment 'nc还是别的类型',
ts timestamp not null default current_timestamp on update current_timestamp
);

drop table if exists bri_org;
create table bri_org(
id int PRIMARY key auto_increment,
org_pk varchar(50) default '' comment '组织PK',
org_name varchar(50) default '' comment '组织名称',
tenant  varchar(20) default '' comment '租户ID',
ts timestamp not null default current_timestamp on update current_timestamp
);

drop table if exists bri_channel;
create table bri_channel(
id int PRIMARY key auto_increment,
tenant varchar(20) default '' comment '租户ID',
orgpk varchar(40) default '' comment '组织PK',
channel varchar(30) default '' comment '渠道code',
config varchar(200) default '' comment '配置信息',
enable tinyint default 0 comment '是否启用 0否 1启用',
is_pre_approve tinyint default 0 comment '是否启用提前审批 0 否  1是',
phone varchar(20) default '' comment '联系人手机号',
open_type tinyint default 0 comment '开通类型 1按照租户开通  2按照组织开通',
create_time datetime default now() comment '开通时间',
ts timestamp not null default current_timestamp on update current_timestamp
);

drop table if exists bri_platform;
create table bri_platform(
  id int PRIMARY KEY auto_increment,
  platform_id varchar(30) NOT NULL comment '渠道编号',
  platform_sn varchar(100) NOT NULL comment '渠道秘钥',
  platform_name varchar(200) default NULL comment '渠道名称',
  ts timestamp not null default current_timestamp on update current_timestamp
);

drop table if exists bri_company;
create table bri_company (
  company_id int PRIMARY KEY auto_increment,
  company_code varchar(50) NOT NULL comment '公司编号',
  company_name varchar(200) NOT NULL comment '公司名称',
  client_key varchar(50) NOT NULL comment '公司key',
  client_secret varchar(200) NOT NULL comment '公司秘钥',
  authorize_type varchar(5) NOT NULL DEFAULT '0' comment '事前审批',
  def1 varchar(100) DEFAULT NULL comment '预留字段1',
  def2 varchar(100) DEFAULT NULL comment '预留字段2',
  def3 varchar(100) DEFAULT NULL comment '预留字段3',
  ts timestamp not null default current_timestamp on update current_timestamp
);

drop table if exists rtpnr_user;
create table rtpnr_user(
id int primary key auto_increment,
user_id varchar(64) default '' comment '用户userid',
mobile varchar(20) default '' comment '用户手机号',
user_name varchar(50) default '' comment '用户名',
is_activation char(1) default 'Y' comment 'Y激活 N非激活',
card_no varchar(24) default '' comment '身份证号',
card_name varchar(50) default '' comment '身份证姓名',
email varchar(100) default '' comment '邮箱地址',
department varchar(200) default '' comment '部门注：为空或"/"则默认到企业总部下面,多部门之间用"/"分割，例如部门是差旅研发组，则这样表示（/研发中心/差旅研发组）',
org_pk varchar(64) default '' comment '组织PK',
tenant varchar(20) default '' comment '租户ID',
f_user_key varchar(50) default '' comment '返回的userkey',
f_login_id varchar(50) default '' comment '登录账号',
admin tinyint default 0 comment '是否是管理员 1是 0否',
staff_num varchar(50) default '' comment '员工编码',
ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);


drop table if exists bri_flight_order;
create table bri_flight_order(
id int primary key auto_increment,
order_no varchar(64) default '' comment '订单编号',
order_type varchar(20) default '' comment '订单类型',
public_or_private char(1) default '' comment '1 因公 2因私',
is_domc char(1) default '' comment '国内国际类型 D国内 I国际',
preium_reason varchar(200) default '' comment '溢价原因',
order_status char(2) default '' comment '订单状态
WS 待提交：开启审批需求的因公新订单未提交审批的订单；
WQ 待确认：开启审批需求的因公订单，提交审批后进入待确认
WA 等待审批：开启审批需求的因公新订单未审批订单；
WR 审批已拒绝：审批单被拒绝
NW 未支付：因私新订单及未开启审批需要的因公新订单中未支付订单；
WP 待出票：已支付或已审批但未出票订单
NP 出票完成：已出票订单
NR 退回：包含支付退回、出票退回、退票申',
payment_price decimal default 0 comment '订单总金额(总支付金额)',
apply_order_no varchar(50) default '' comment '申请单编号',
fare_price decimal default 0 comment '单人票面价',
json_other_info varchar(200) default '' comment '其他信息',
tax_price decimal default 0 comment '单人税金',
psg_count int default 0 comment '人数',
status_type char(1) default '' comment 'N正常单 T退票单',
refund_price decimal default 0 comment '实退金额',
tp_price decimal default 0 comment '退票费',
trip_type char(2) default '' comment 'OW单程 RT往返',
is_check char(1) default '' comment '是否需要审批 N不需要 Y 需要',
is_allow_refund char(1) default '' comment '是否允许提前退票 Y允许 N 不允许',
allow_pay_date datetime default null comment '最晚允许支付时间',
refund_mark varchar(200) default '' comment '商家退回备注',
verify_type char(1) default '' comment '1商旅审批 2 OA审批',
head_user_name varchar(20) default '' comment '责任人',
flow_base_id varchar(20) default '' comment '审批规则ID',
is_allow_check char(1) default '' comment '是否允许审批 0不允许 1 允许',
sum_counter_fee decimal default 0 comment '订单总服务费',
sum_ins_money decimal default 0 comment '订单总保险金额',
related_no varchar(48) default '' comment '拆单关联订单号',
related_type char(1) default '' comment '0 去程 1 回程',
is_purchase char(1) default '' comment '是否政采 Y是 N普通',
purchase_cust_name  varchar(50) default '' comment '',
purchase_verify char(10) default '' comment 'CD公务员卡验证 CT公司名称验证',
is_hs char(1) default '' comment '是否航司 Y是 N否',
hs_title varchar(50) default '' comment '航司官网订单显示标题',
save_price decimal default 0 comment '节省金额',
create_by varchar(40) default '' comment '创建人',
order_time datetime default null comment '创建时间',
yx_date datetime default null comment '有效时间',
from_type varchar(20) default '' comment '机票来源,如zhyg中航易购等',
bx_status int default 0 comment '报销状态 0未报销 1 报销中 2 已报销',
pay_type varchar(30) default '' comment '支付方式',
send_ticket_fee decimal default 0 comment '送票费',
change_fee decimal default 0 comment '改签费',
currency varchar(20) default '' comment '结算币种',
no_pre_order_reason  varchar(200) default '' comment '未提前预定原因',
no_order_lowst_reason varchar(200) default '' comment '未预定最低价原因',
relate_ybz_id varchar(50) default '' comment '关联行程号',
relate_other_id varchar(50) default '' comment '关联外部单据单号',
pre_order_mode varchar(50) default '' comment '预定方式',
auth_status int default 0 comment '授权状态',
note varchar(300) default '' comment '备注',
pay_way varchar(50) default '' comment '支付方式',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_flight_order_otherinfo;
create table bri_flight_order_otherinfo
(
id int PRIMARY key auto_increment,
order_no varchar(64) default '' comment '订单编号',
`key` varchar(48) default '' comment 'key值',
val varchar(100) default '' comment 'value值',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if EXISTS bri_flight_info;
create table bri_flight_info
(
id int primary key auto_increment,
order_no varchar(64) default '' comment '订单编号',
carrier_name varchar(64) default '' comment '航司名称',
board_point varchar(10) default '' comment '出发城市三字码',
board_point_name varchar(64) default '' comment '出发城市名称',
board_point_air_port_name varchar(100) default '' comment '出发城市机场名称',
board_point_at varchar(64) default '' comment '出发机场航站楼',
departure_date date default null comment '出发日期',
departure_time time default null comment '出发时间',
off_point varchar(10) default '' comment '到达城市三字码',
off_point_name varchar(64) default '' comment '到达城市',
off_point_air_port_name varchar(100) default '' comment '到达机场名称',
off_point_at varchar(64) default '' comment '到达机场航站楼',
arrive_date date default null comment '到达日期',
arrive_time time default null comment '到达时间',
flight_no varchar(64) default '' comment '航班号',
aircraft varchar(24) default '' comment '机型',
time_span varchar(24) default '' comment '飞行时间',
tgq varchar(200) default '' comment '退改签',
yprice varchar(40) default '' comment '全价',
class_rebate varchar(30) default '' comment '折扣',
class_code varchar(20) default '' comment '舱位编码',
class_level_code varchar(20) default '' comment '舱位等级编码',
class_level_name varchar(50) default '' comment '舱位等级名称',
from_type varchar(20) default '' comment '机票来源,如zhyg中航易购等',
lowest_price decimal default 0 comment '最低价',

ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if EXISTS bri_flight_order_contact;
create table bri_flight_order_contact(
id int primary key auto_increment,
order_no varchar(64) default '' comment '订单编号',
contact_name varchar(30) default '' comment '联系人姓名',
contact_mobile varchar(20) default '' comment '联系电话',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_flight_passenger;
create table bri_flight_passenger(
id int primary key auto_increment,
order_no varchar(64) default '' comment '订单编号',
psg_name varchar(30) default '' comment '乘机人姓名',
oa_user_code varchar(64) default '' comment '乘机人员工编号',
psg_type varchar(10) default '' comment '乘客类型 ADT成人 INF婴儿 CHD儿童 UM 无人陪伴儿童 ',
card_type varchar(20) default '' comment '证件类型',
card_no varchar(30) default '' comment '证件号',
cost_center varchar(30) default '' comment '成本中心',
ticket_no varchar(30) default '' comment '机票号',
ticket_status varchar(20) default '' comment '票号状态：-1:未知（UnKnow）/1:待使用（OpenForUse）/2:已使用（USED/FLOWN）/3:已经办理登记（CHECKED-IN）/4:已离港（LIFT/BOARDED）/5:已作废（VOID）/6:已退票（REFUNDED）/7:换开（EXCHANGED）/8:挂起（SUSPENDED）/9:机场控制（AIRPORT CNTL）/10:机场控制（CPN NOTE）/11:未查到（NOT FOUND）',
department_name varchar(40) default '' comment '部门名称',
is_allow_refund char(1) default '' comment '是否允许提价退票Y允许 N 不允许',
psg_refund_price decimal default 0 comment '当前乘机人实退金额',
psg_tp_price decimal default 0 comment '当前乘机人退票费',
counter_fee decimal default 0 comment '服务费',
is_rule_over char(1) default '' comment 'Y是 N 否',
no_travel_rules  varchar(200) default '' comment '不符合差旅项',
tp_counter_fee decimal default 0 comment '退票服务费',
ins_id varchar(64) default '' comment '保险产品ID',
ins_name varchar(64) default '' comment '保险名称',
ins_count int default 0 comment '保险份数',
ins_money decimal default 0 comment '保险单价',
purchase_bank varchar(50) default '' comment '公务员卡开户银行',
is_cus_psg char(1) default ''  comment '是否常旅客 0临客  1 常旅客',
psg_level varchar(40) default '' comment '乘机人职级',
bind_counter_fee  decimal default 0 comment '绑定服务费',
consturct_and_fuel decimal default 0 comment '基建和燃油',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_flight_approval_flow;
create table bri_flight_approval_flow(
id int PRIMARY key auto_increment,
order_no varchar(64) default '' comment '订单编号',
approval_no varchar(64) default '' comment '审批单号',
step_no varchar(64) default '' comment '当前步骤',
step_run_status char(1) default '' comment '0 待审核 1 已审核 2不同意审核',
dealer_user_name varchar(40) default '' comment '处理人名称',
check_remark varchar(64) default '' comment '审批意见',
check_time datetime default null comment '审批时间',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_train_order;
create table bri_train_order(
id int primary key auto_increment ,
order_no varchar(64) default '' comment '订单号',
public_or_private  char(1) default '' comment '1 因公 2因私',
is_domc char(1) default '' comment '国内国际类型 D国内 I国际',
preium_reason varchar(200) default '' comment '溢价原因',
status_type char(1) default '' comment 'N正常单 T退票单',
yx_date datetime default null comment '有效时间',
save_price decimal default 0 comment '节省金额',
create_by varchar(40) default '' comment '创建人',
order_time datetime default null comment '创建时间',
order_status char(2) default '' comment 'WS 待提交：开启审批需求的因公新订单未提交审批的订单；【只能取消订单】
WA 等待审批：开启审批需求的因公新订单未审批订单；【不能做任何操作】
WR 审批已拒绝：审批单被拒绝 【只能取消订单】
AT 新单待确认【只能取消订单】
NW 新订单待支付【可取消订单，可支付】
PY 已支付【不能做任何操作】
TP 已出票【根据是否可退票判断做退票操作】
RW 出票失败待退款【不能做任何操作】
RP 出票失败已退款【不能做任何操作】
CO 已取消【不能做任何操作】
AR 申请退票【不能做任何操作】
PR 退票(退款)部分成功 【不能做任何操作】
FR 退票成功【不能做任何操作】
RR 退票失败【不能做任何操作】
GA 改签申请
GE 改签失败
GK 座位确认
GO 取消改签
GT 改签成功
GR 改签退票单(未退款) -改签退票成功
GD 改签退票单结束(已退款)- 改签退票成功',
payment_price decimal default 0 comment '支付金额',
train_code varchar(20) default '' comment '车次',
train_code_name varchar(40) default '' comment '车次名称',
from_station varchar(20) default '' comment '出发车站',
to_station varchar(20) default '' comment '到达车站',
train_date date default null comment '出发日期',
from_time time default null comment '出发时间',
from_xq varchar(10) default '' comment '出发星期',
to_date date default null comment '到达日期',
to_time time default null comment '到达日期',
to_xq varchar(10) default '' comment '到达星期',
tun_time varchar(20) default '' comment '时长',
seat_type varchar(16) default '' comment '座位类型：一等座',
link_name varchar(20) default '' comment '联系人',
cancel_reason varchar(60) default '' comment '取消原因',
pay_limit_time   datetime default null comment '支付超时时间',
pay_limit_status char(1) default null comment '支付超时时间 Y超时 N 没超时',
link_phone varchar(20) default '' comment '联系电话',
refund_swift_no varchar(64) default '' comment '退票流水号',
is_allow_refund char(1) default '' comment '是否允许提交退票 Y允许 N不允许',
json_other_info varchar(200) default '' comment '其他信息',
allow_pay_date datetime default null comment '最晚允许支付时间',
is_check char(1) default '' comment '是否需要审批',
check_status char(1) default '' comment '审批状态 0未提交 1待审批 2审批通过 3 审批不通过',
order_type char(1) default '' comment '订单类型 N正常单 T退票单 G改签订单',
refund_price decimal default 0 comment '实退金额',
tp_price decimal default 0 comment '退票费',
sum_counter_fee decimal default 0 comment '服务费',
carrier_sum_fee DECIMAL default 0 comment '改签总变更费，改签订单时使用',
is_supplement tinyint default 0 comment '是否补录订单补录订单不允许对订单做任何操作 0非补录订单 1 补录订单',
verify_type char(1) default ''  comment '审批方式 1商旅审批 2 OA审批',
head_user_name varchar(20) default '' comment '责任人',
flow_base_id varchar(64) default '' comment '审批规则ID',
is_allow_check char(1) default ''  comment '是否允许审批 0 不允许审批操作 1 允许审批操作',
order_status_name varchar(60) default '' comment '订单状态名称',
train_order_no varchar(64) default '' comment '12306订单号',
parent_order_no varchar(64) default '' comment '改签单/退票单原订单号',
apply_order_no varchar(64) default '' comment '出差审批单号',
from_type varchar(20) default '' comment '机票来源,如zhyg中航易购等',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_train_order_otherinfo;
create table bri_train_order_otherinfo
(
id int PRIMARY key auto_increment,
order_no varchar(64) default '' comment '订单编号',
`key` varchar(48) default '' comment 'key值',
val varchar(100) default '' comment 'value值',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);


drop table if exists bri_train_passenger;
CREATE TABLE `bri_train_passenger`(
id int primary key auto_increment,
order_no varchar(50) default '' comment '订单编号',
psg_name varchar(30) default '' comment '乘车人姓名',
oa_user_code varchar(30) default '' comment '乘车人员工编号',
ticket_type int default 0 comment '0 成人票 1 儿童票',
card_type varchar(20) default '' comment '证件类型',
card_no varchar(50) default '' comment '证件号',
cost_center varchar(100) default '' comment '成本中心',
seat_type varchar(20) default '' comment '座位类型',
train_box varchar(20) default '' comment '车厢',
seat_no varchar(10) default '' comment '座位号',
tkt_price decimal default 0 comment '票价',
psg_status varchar(10) default '' comment '乘客状态',
refund_amount decimal default 0 comment '实退金额',
tp_price decimal default 0 comment '退票费',
counter_fee decimal default 0 comment '服务费',
carrier_change_fee decimal default 0 comment '乘客改签变更费订单时使用',
is_rule_over varchar(20) default '' comment '差旅是否超标',
no_travel_rules varchar(50) default '' comment '不符合差旅项',
is_allow_refund varchar(20) default '' comment '是否允许提价退票',
psg_no varchar(20) default '' comment '旅客编号',
is_cus_psg varchar(10) default '' comment '是否常旅客',
person_mobile varchar(20) default '' comment '旅客电话',
 `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);



drop table if exists bri_train_approval_flow;
create table bri_train_approval_flow(
id int PRIMARY key auto_increment,
order_no varchar(64) default '' comment '订单号',
approval_no varchar(64) default '' comment '审批单号',
step_no varchar(64) default '' comment '当前步骤',
step_run_status char(1) default '' comment '0 待审核 1 已审核 2不同意审核',
dealer_user_name varchar(40) default '' comment '处理人名称',
check_remark varchar(64) default '' comment '审批意见',
check_time datetime default null comment '审批时间',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_hotel_order;
create table bri_hotel_order(
id int PRIMARY key auto_increment,
order_no varchar(64) default '' comment '订单号',
public_or_private  char(1) default '' comment '1 因公 2因私',
is_domc char(1) default '' comment '国内国际类型 D国内 I国际',
preium_reason varchar(200) default '' comment '溢价原因',
status_type char(1) default '' comment 'N正常单 T退票单',
yx_date datetime default null comment '有效时间',
save_price decimal default 0 comment '节省金额',
create_by varchar(40) default '' comment '创建人',
order_time datetime default null comment '创建时间',
order_status char(2) default '' comment 'WS 待提交：开启审批需求的因公已确认订单未提交审批的订单；
WQ 待确认：开启审批需求的因公订单，提交审批后进入待确认
WA 等待审批：开启审批需求的因公新订单未审批订单；
WR 审批已拒绝：审批单被拒绝
10 待确认 （只有待确认订单才可以进行取消）
11 取消   12 已确认(现付)/待支付(预付)  13 入住中
14 正常离店	15 提前离店	16 NoShow	17 已支付
18 变更取消	19 确认失败已退款	20 已确认（预付）',
OrderStatusName varchar(20) default '' comment '订单状态名称',
payment_price decimal default 0 comment '支付金额',
hotel_name varchar(40) default '' comment '酒店名称',
hotel_id varchar(20) default '' comment '酒店编号',
room_name varchar(30) default '' comment '房型名称',
room_type_id varchar(20) default '' comment '房型编号',
rate_plan_name varchar(64) default '' comment '产品名称' ,
rate_plan_id varchar(64) default '' comment '产品编号',
room_nums int default 0 comment '房间数',
arrival_date date default null comment '到店日期',
departure_date date default null comment '离店日期',
in_days int default 0 comment '住宿天数',
latest_arrival_time datetime default null comment '最晚到店时间',
hotel_address varchar(64) default '' comment '酒店地址',
hotel_tel varchar(20) default '' comment '酒店电话',
create_time datetime default null comment '预订时间',
pay_type char(2) default '' comment '付款类型 SP现付 PP预付',
is_guarantee tinyint default  0 comment '是否担保 0 否  1是',
guarantee_info varchar(200) default '' comment '担保信息',
contact_name varchar(10) default '' comment '联系人',
contact_mobile varchar(20) default '' comment '联系人手机',
is_allow_cancel tinyint default 0 comment '是否允许取消 0 不允许 1 允许',
cancel_time datetime default null comment '最晚取消时间,当允许取消时该字段有效',
gcj_lat varchar(60) default '' comment '高德坐标纬度',
gcj_lon varchar(60) default '' comment '高德坐标经度',
baidu_lat varchar(60) default '' comment '百度地图纬度',
baidu_lon varchar(60) default '' comment '百度地图经度',
verify_type char(1) default ''  comment '审批方式 1商旅审批 2 OA审批',
head_user_name varchar(20) default '' comment '责任人',
flow_base_id varchar(64) default '' comment '审批规则ID',
is_allow_check char(1) default ''  comment '审核操作状态 0不允许 1 允许',
penalty_to_customer decimal default 0 comment '变更取消产生的罚金',
penalty_currency_code varchar(20) default '' comment '变更取消使用的币种',
prepay_rule_info varchar(30) default '' comment '1、不允许变更取消；#
2、在到店当日24点前5小时前按规则看是否可以免费变更取消"，（多个规则时用“#”拆分）',
passenger_type varchar(20) default '' comment 'All 统一价
Chinese 内宾价 OtherForeign 外宾价 HongKong 港澳台客人价 Japanese 日本客人价',
payment_type varchar(20) default '' comment '付款方式 SelfPay 前台现付  SelfPay 预付',
invoice_mode varchar(30) default '' comment '发票开具模式： hotel酒店开具 elong艺龙开具',
sum_service_charge  decimal default 0 comment '预付酒店总服务费',
apply_order_no varchar(64) default '' comment '出差审批单号',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_hotel_order_otherinfo;
create table bri_hotel_order_otherinfo
(
id int PRIMARY key auto_increment,
order_no varchar(64) default '' comment '订单编号',
`key` varchar(48) default '' comment 'key值',
val varchar(100) default '' comment 'value值',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_hotel_room;
create table  bri_hotel_room(
id int PRIMARY key auto_increment ,
order_no varchar(64) default '' comment '订单号',
psg_name varchar(20) default '' comment '入住人姓名',
oa_user_code varchar(64) default '' comment '入住人员工编号',
person_mobile varchar(20) default '' comment '入住人手机',
cost_center varchar(30) default '' comment '成本中心',
is_rule_over char(1) default '' comment '差旅是否超标 Y是 N否',
no_travel_rules varchar(64) default '' comment '不符合差旅项',
service_fee decimal default 0 comment '预付酒店服务费',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if exists bri_hotel_approval_flow;
create table bri_hotel_approval_flow(
id int PRIMARY key auto_increment,
order_no varchar(64) default '' comment '订单号',
approval_no varchar(64) default '' comment '审批单号',
step_no varchar(64) default '' comment '当前步骤',
step_run_status char(1) default '' comment '0 待审核 1 已审核 2不同意审核',
dealer_user_name varchar(40) default '' comment '处理人名称',
check_remark varchar(64) default '' comment '审批意见',
check_time datetime default null comment '审批时间',
ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);


drop table if exists ystrip_user_history;
create table ystrip_user_history(
  id int primary key auto_increment,
  company_no varchar(100) not null comment '公司编号',
  user_no varchar(100) not null comment '用户编号',
  user_id varchar(50) not null comment '用户主键',
  user_name varchar(100) comment '用户姓名',
  user_phone varchar(20) comment '用户手机',
  user_email varchar(100) comment '用户邮箱',
  card_no varchar(30) comment '身份证号',
  remark varchar(200) comment '备注',
  channel varchar(50) comment '渠道',
  status varchar(10) comment '返回状态',
  result varchar(300) comment '返回描述',
  ts  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

-- 转换平台注册 单据类型交易类型
DROP TABLE IF EXISTS `cnv_billtype`;
CREATE TABLE `cnv_billtype`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `type` bit(1) NULL DEFAULT b'0' COMMENT '类型：1单据类型 0交易类型',
  `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编码',
  `enable` bit(1) NULL DEFAULT b'1' COMMENT '启用状态 0停用 1启用',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
  `classifyid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '单据类型',
  `entityid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联实体',
  `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8;

INSERT INTO `cnv_billtype` VALUES ('G001ZM0000BILLTYPEFIER00000000000010', b'1', 'brigade_flight', b'1', '商旅机票', NULL, 'G001ZM0000BILLTYPE000000000000000020', '2018-08-15 09:44:13');
INSERT INTO `cnv_billtype` VALUES ('G001ZM0000BRIGADEBILLTYPE00000000020', b'1', 'brigade_train', b'1', '商旅火车票', NULL, 'G001ZM0000BRIGADEENTITY0000000000020', '2018-08-27 11:37:47');
INSERT INTO `cnv_billtype` VALUES ('G001ZM0000BRIGADEBILLTYPE00000000030', b'1', 'brigade_hotel', b'1', '商旅酒店', NULL, 'G001ZM0000BRIGADEENTITY0000000000030', '2018-09-01 11:22:34');
INSERT INTO `cnv_billtype` VALUES ('G001ZM0000BRIGADETRADETYPE0000000020', b'0', 'train_order', b'1', '火车票订单', 'brigade_train', NULL, '2018-08-27 11:37:19');
INSERT INTO `cnv_billtype` VALUES ('G001ZM0000BRIGADETRADETYPE0000000030', b'0', 'hotel_order', b'1', '酒店订单', 'brigade_hotel', NULL, '2018-08-31 12:49:49');
INSERT INTO `cnv_billtype` VALUES ('G001ZM0000TRADETYPEFIER0000000000010', b'0', 'flight_order', b'1', '机票订单', 'brigade_flight', NULL, '2018-08-23 18:14:24');

-- 转换平台注册实体
DROP TABLE IF EXISTS `cnv_entity`;
CREATE TABLE `cnv_entity`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `displayName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示名称',
  `entityName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '实体标识',
  `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8;

INSERT INTO `cnv_entity` VALUES ('G001ZM0000BILLTYPE000000000000000020', '机票订单', 'flight_head', '2018-08-23 18:15:01');
INSERT INTO `cnv_entity` VALUES ('G001ZM0000BRIGADEENTITY0000000000020', '火车票订单', 'train_head', '2018-08-27 11:38:03');
INSERT INTO `cnv_entity` VALUES ('G001ZM0000BRIGADEENTITY0000000000030', '酒店订单', 'hotel_head', '2018-08-31 12:51:46');

-- 转换平台注册实体的属性
DROP TABLE IF EXISTS `cnv_attribute`;
CREATE TABLE `cnv_attribute`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `assemblyType` int(11) NULL DEFAULT NULL COMMENT '组合方式',
  `columnName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列名',
  `dataType` int(11) NULL DEFAULT NULL COMMENT '数据类型',
  `dataTypeInfo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据类型信息',
  `defaultvalue` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '默认值',
  `displayName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示名称',
  `hidden` bit(1) NULL DEFAULT NULL COMMENT '是否隐藏',
  `isExtend` bit(1) NULL DEFAULT NULL COMMENT '是否扩展字段',
  `isSyncDB` bit(1) NULL DEFAULT NULL COMMENT '是否需要持久化',
  `maxLength` int(11) NULL DEFAULT NULL COMMENT '最大长度',
  `nullable` bit(1) NULL DEFAULT NULL COMMENT '允许为空',
  `numberDigit` int(11) NULL DEFAULT NULL COMMENT '精度',
  `propertyName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性标识',
  `refEntity` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联实体',
  `refEntityCode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联实体编码',
  `tableName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表名',
  `ownerEntity` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所在实体编码',
  `enumCode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `rowno` int(11) NULL DEFAULT NULL,
  `unionKey` bit(1) NULL DEFAULT NULL,
  `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8;

INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000000', 10, 'orderNo', 6, '', NULL, '订单编号', b'0', b'0', b'0', 100, b'1', 0, 'orderNo', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000001', 10, 'orderType', 6, '', NULL, '订单类型', b'0', b'0', b'0', 50, b'1', 0, 'orderType', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000002', 10, 'publicOrPrivate', 6, '', NULL, '因公因私', b'0', b'0', b'0', 50, b'1', 0, 'publicOrPrivate', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000004', 10, 'preiumReason', 6, '', NULL, '溢价原因', b'0', b'0', b'0', 255, b'1', 0, 'preiumReason', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000006', 10, 'paymentPrice', 5, '', NULL, '订单总金额', b'0', b'0', b'0', 50, b'1', 0, 'paymentPrice', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000007', 10, 'applyOrderNo', 6, '', NULL, '申请单编号', b'0', b'0', b'0', 50, b'1', 0, 'applyOrderNo', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000008', 10, 'farePrice', 5, '', NULL, '单人票面价', b'0', b'0', b'0', 50, b'1', 0, 'farePrice', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 20:45:57');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000011', 10, 'psgCount', 1, '', NULL, '人数', b'0', b'0', b'0', 11, b'1', 0, 'psgCount', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000012', 10, 'statusType', 6, '', NULL, '正常单或退票单', b'0', b'0', b'0', 10, b'1', 0, 'statusType', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000013', 10, 'refundPrice', 5, '', NULL, '实退金额', b'0', b'0', b'0', 50, b'1', 0, 'refundPrice', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000014', 10, 'tpPrice', 5, '', NULL, '退票费', b'0', b'0', b'0', 50, b'1', 0, 'tpPrice', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000015', 10, 'tripType', 6, '', NULL, '单程或往返', b'0', b'0', b'0', 50, b'1', 0, 'tripType', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000024', 10, 'relatedNo', 6, '', NULL, '拆单关联订单号', b'0', b'0', b'0', 50, b'1', 0, 'relatedNo', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000025', 10, 'relatedType', 6, '', NULL, '去返程', b'0', b'0', b'0', 50, b'1', 0, 'relatedType', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000030', 10, 'createBy', 6, '', NULL, '创建人', b'0', b'0', b'0', 100, b'1', 0, 'createBy', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000031', 10, 'orderTime', 2, '', NULL, '创建时间', b'0', b'0', b'0', 50, b'1', 0, 'orderTime', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000033', 10, 'fromType', 6, '', NULL, '机票来源', b'0', b'0', b'0', 50, b'1', 0, 'fromType', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000040', 10, 'noOrderLowstReason', 6, '', NULL, '未预定最低价原因', b'0', b'0', b'0', 255, b'1', 0, 'noOrderLowstReason', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000000045', 10, 'note', 2, '', NULL, '备注', b'0', b'0', b'0', 400, b'1', 0, 'note', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-15 14:38:10');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001004', 10, 'boardPointName', 6, '', NULL, '出发城市名称', b'0', b'0', b'0', 100, b'1', 0, 'boardPointName', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001005', 10, 'boardPointAirPortName', 6, '', NULL, '出发城市机场名称', b'0', b'0', b'0', 100, b'1', 0, 'boardPointAirPortName', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001007', 10, 'departureDate', 8, '', NULL, '出发日期', b'0', b'0', b'0', 50, b'1', 0, 'departureDate', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001008', 10, 'departureTime', 9, '', NULL, '出发日期', b'0', b'0', b'0', 50, b'1', 0, 'departureTime', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001010', 10, 'offPointName', 6, '', NULL, '到达城市', b'0', b'0', b'0', 50, b'1', 0, 'offPointName', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001011', 10, 'offPointAirPortName', 6, '', NULL, '到达机场名称', b'0', b'0', b'0', 100, b'1', 0, 'offPointAirPortName', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001013', 10, 'arriveDate', 8, '', NULL, '到达日期', b'0', b'0', b'0', 50, b'1', 0, 'arriveDate', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001014', 10, 'arriveTime', 9, '', NULL, '到达时间', b'0', b'0', b'0', 50, b'1', 0, 'arriveTime', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001015', 10, 'flightNo', 6, '', NULL, '航班号', b'0', b'0', b'0', 100, b'1', 0, 'flightNo', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001019', 10, 'yprice', 6, '', NULL, '全价', b'0', b'0', b'0', 50, b'1', 0, 'yprice', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001020', 10, 'classRebate', 6, '', NULL, '折扣', b'0', b'0', b'0', 50, b'1', 0, 'classRebate', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001023', 10, 'classLevelName', 6, '', NULL, '舱位等级名称', b'0', b'0', b'0', 50, b'1', 0, 'classLevelName', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001024', 10, 'lowestPrice', 5, NULL, NULL, '最低价', b'0', b'0', b'0', 50, b'1', 0, 'lowestPrice', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-28 15:08:57');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001030', 10, 'boardPointName2', 6, '', NULL, '返程出发城市名称', b'0', b'0', b'0', 100, b'1', 0, 'boardPointName2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001031', 10, 'boardPointAirPortName2', 6, '', NULL, '返程出发城市机场名称', b'0', b'0', b'0', 100, b'1', 0, 'boardPointAirPortName2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001032', 10, 'departureDate2', 8, '', NULL, '返程出发日期', b'0', b'0', b'0', 50, b'1', 0, 'departureDate2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001033', 10, 'departureTime2', 9, '', NULL, '返程出发日期', b'0', b'0', b'0', 50, b'1', 0, 'departureTime2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001034', 10, 'offPointName2', 6, '', NULL, '返程到达城市', b'0', b'0', b'0', 50, b'1', 0, 'offPointName2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-28 15:50:17');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001035', 10, 'offPointAirPortName2', 6, '', NULL, '返程到达机场名称', b'0', b'0', b'0', 100, b'1', 0, 'offPointAirPortName2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001036', 10, 'arriveDate2', 8, '', NULL, '返程到达日期', b'0', b'0', b'0', 50, b'1', 0, 'arriveDate2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001037', 10, 'arriveTime2', 9, '', NULL, '返程到达时间', b'0', b'0', b'0', 50, b'1', 0, 'arriveTime2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001038', 10, 'flightNo2', 6, '', NULL, '返程航班号', b'0', b'0', b'0', 100, b'1', 0, 'flightNo2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001039', 10, 'yprice2', 6, '', NULL, '返程全价', b'0', b'0', b'0', 50, b'1', 0, 'yprice2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001040', 10, 'classRebate2', 6, '', NULL, '返程折扣', b'0', b'0', b'0', 50, b'1', 0, 'classRebate2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001041', 10, 'classLevelName2', 6, '', NULL, '返程舱位等级名称', b'0', b'0', b'0', 50, b'1', 0, 'classLevelName2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-23 18:19:24');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001042', 10, 'lowestPrice2', 5, NULL, NULL, '返程最低价', b'0', b'0', b'0', 50, b'1', 0, 'lowestPrice2', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-28 15:08:57');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000FLIGHTORDER000000000001101', 10, 'passenger', 6, '', NULL, '出行人', b'0', b'0', b'0', 50, b'1', 0, 'passenger', NULL, NULL, NULL, 'G001ZM0000BILLTYPE000000000000000020', NULL, NULL, NULL, '2018-08-28 14:59:13');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000001', 10, 'orderNo', 6, '', NULL, '订单号', b'0', b'0', b'0', 100, b'1', 0, 'orderNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000002', 10, 'travelType', 6, '', NULL, '出行方式', b'0', b'0', b'0', 10, b'1', 0, 'travelType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000003', 10, 'isDomc', 6, '', NULL, '国内国际类型', b'0', b'0', b'0', 10, b'1', 0, 'isDomc', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000004', 10, 'preiumReason', 6, '', NULL, '溢价原因', b'0', b'0', b'0', 255, b'1', 0, 'preiumReason', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000005', 10, 'statusType', 6, '', NULL, '正常/退票单', b'0', b'0', b'0', 10, b'1', 0, 'statusType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000006', 10, 'createBy', 6, '', NULL, '创建人', b'0', b'0', b'0', 100, b'1', 0, 'createBy', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000007', 10, 'orderTime', 15, '', NULL, '创建时间', b'0', b'0', b'0', 100, b'1', 0, 'orderTime', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000008', 10, 'orderStatusName', 6, '', NULL, '订单状态名称', b'0', b'0', b'0', 100, b'1', 0, 'orderStatusName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000009', 10, 'paymentPrice', 5, '', NULL, '支付金额', b'0', b'0', b'0', 10, b'1', 2, 'paymentPrice', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000010', 10, 'hotelName', 6, '', NULL, '酒店名称', b'0', b'0', b'0', 100, b'1', 0, 'hotelName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000011', 10, 'roomName', 6, '', NULL, '房型名称', b'0', b'0', b'0', 100, b'1', 0, 'roomName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000012', 10, 'roomNums', 1, '', NULL, '房间数', b'0', b'0', b'0', 20, b'1', 0, 'roomNums', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000013', 10, 'arrivalDate', 8, '', NULL, '到店日期', b'0', b'0', b'0', 100, b'1', 0, 'arrivalDate', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000014', 10, 'departureDate', 8, '', NULL, '离店日期', b'0', b'0', b'0', 100, b'1', 0, 'departureDate', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000015', 10, 'inDays', 1, '', NULL, '出行方式', b'0', b'0', b'0', 20, b'1', 0, 'inDays', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000016', 10, 'createTime', 15, '', NULL, '预定时间', b'0', b'0', b'0', 100, b'1', 0, 'createTime', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000017', 10, 'penaltyToCustomer', 6, '', NULL, '变更取消产生的罚金', b'0', b'0', b'0', 100, b'1', 0, 'penaltyToCustomer', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000018', 10, 'invoice', 6, '', NULL, '发票开具模式', b'0', b'0', b'0', 100, b'1', 0, 'invoice', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000019', 10, 'sumServiceCharge', 5, '', NULL, '预付酒店总服务费', b'0', b'0', b'0', 10, b'1', 2, 'sumServiceCharge', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000020', 10, 'applyOrderNo', 6, '', NULL, '出差审批单号', b'0', b'0', b'0', 100, b'1', 0, 'applyOrderNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000021', 10, 'fromType', 6, '', NULL, '订单来源', b'0', b'0', b'0', 100, b'1', 0, 'fromType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000022', 10, 'cardHolderName', 6, '', NULL, '持卡人', b'0', b'0', b'0', 50, b'1', 0, 'cardHolderName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000023', 10, 'hotelType', 6, '', NULL, '酒店类型', b'0', b'0', b'0', 50, b'1', 0, 'hotelType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000024', 10, 'hotelCity', 6, '', NULL, '入住城市', b'0', b'0', b'0', 50, b'1', 0, 'hotelCity', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000025', 10, 'hotelStars', 6, '', NULL, '酒店星级', b'0', b'0', b'0', 10, b'1', 0, 'hotelStars', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000026', 10, 'inNights', 1, '', NULL, '间夜', b'0', b'0', b'0', 20, b'1', 0, 'inNights', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000027', 10, 'currency', 6, '', NULL, '结算币种', b'0', b'0', b'0', 50, b'1', 0, 'currency', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000028', 10, 'preOrderMode', 6, '', NULL, '预订方式', b'0', b'0', b'0', 50, b'1', 0, 'preOrderMode', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000029', 10, 'relateYbzId', 6, '', NULL, '关联行程单', b'0', b'0', b'0', 100, b'1', 0, 'relateYbzId', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000HOTELORDER0000000000000030', 10, 'relateOtherId', 6, '', NULL, '关联申请单号', b'0', b'0', b'0', 100, b'1', 0, 'relateOtherId', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000030', NULL, NULL, NULL, '2018-08-31 12:53:20');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000001', 10, 'orderNo', 6, '', NULL, '订单号', b'0', b'0', b'0', 100, b'1', 0, 'orderNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:27');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000002', 10, 'publicOrPriveate', 6, '', NULL, '出行方式', b'0', b'0', b'0', 10, b'1', 0, 'publicOrPriveate', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000003', 10, 'isDomc', 6, '', NULL, '国内国际类型', b'0', b'0', b'0', 10, b'1', 0, 'isDomc', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000004', 10, 'preiumReason', 6, '', NULL, '溢价原因', b'0', b'0', b'0', 255, b'1', 0, 'preiumReason', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000005', 10, 'statusType', 6, '', NULL, '正常单或退票单', b'0', b'0', b'0', 10, b'1', 0, 'statusType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000006', 10, 'yxDate', 8, '', NULL, '有效时间', b'0', b'0', b'0', 100, b'1', 0, 'yxDate', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000007', 10, 'savePrice', 5, '', NULL, '节省金额', b'0', b'0', b'0', 100, b'1', 0, 'savePrice', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000008', 10, 'createBy', 6, '', NULL, '创建人', b'0', b'0', b'0', 100, b'1', 0, 'createBy', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000009', 10, 'orderTime', 8, '', NULL, '创建时间', b'0', b'0', b'0', 100, b'1', 0, 'orderTime', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000010', 10, 'orderStatus', 6, '', NULL, '单据状态', b'0', b'0', b'0', 10, b'1', 0, 'orderStatus', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000011', 10, 'paymentPrice', 8, '', NULL, '支付金额', b'0', b'0', b'0', 100, b'1', 0, 'paymentPrice', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000012', 10, 'trainCode', 6, '', NULL, '车次', b'0', b'0', b'0', 100, b'1', 0, 'trainCode', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000013', 10, 'trainCodeName', 6, '', NULL, '车次名称', b'0', b'0', b'0', 100, b'1', 0, 'trainCodeName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000014', 10, 'fromStation', 6, '', NULL, '出发车站', b'0', b'0', b'0', 100, b'1', 0, 'fromStation', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000015', 10, 'toStation', 6, '', NULL, '到达车站', b'0', b'0', b'0', 100, b'1', 0, 'toStation', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000016', 10, 'trainDate', 8, '', NULL, '出发日期', b'0', b'0', b'0', 100, b'1', 0, 'trainDate', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000017', 10, 'fromTime', 9, '', NULL, '出发时间', b'0', b'0', b'0', 100, b'1', 0, 'fromTime', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000018', 10, 'fromXq', 6, '', NULL, '出发星期', b'0', b'0', b'0', 100, b'1', 0, 'fromXq', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000019', 10, 'toDate', 8, '', NULL, '到达日期', b'0', b'0', b'0', 100, b'1', 0, 'toDate', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000020', 10, 'toTime', 9, '', NULL, '到达时间', b'0', b'0', b'0', 100, b'1', 0, 'toTime', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000021', 10, 'toXq', 6, '', NULL, '到达星期', b'0', b'0', b'0', 100, b'1', 0, 'toXq', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000022', 10, 'tunTime', 6, '', NULL, '时长', b'0', b'0', b'0', 100, b'1', 0, 'tunTime', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000023', 10, 'seatType', 6, '', NULL, '作为类别', b'0', b'0', b'0', 100, b'1', 0, 'seatType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:35:30');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000024', 10, 'linkName', 6, '', NULL, '联系人', b'0', b'0', b'0', 100, b'1', 0, 'linkName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:35:45');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000025', 10, 'cancelReason', 9, '', NULL, '取消原因', b'0', b'0', b'0', 100, b'1', 0, 'cancelReason', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000026', 10, 'payLimitTime', 15, '', NULL, '支付超时时间', b'0', b'0', b'0', 100, b'1', 0, 'payLimitTime', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000027', 10, 'payLimitStatus', 6, '', NULL, '支付超时状态', b'0', b'0', b'0', 10, b'1', 0, 'payLimitStatus', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000028', 10, 'toTime', 9, '', NULL, '到达时间', b'0', b'0', b'0', 100, b'1', 0, 'toTime', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000029', 10, 'linkPhone', 6, '', NULL, '联系电话', b'0', b'0', b'0', 100, b'1', 0, 'linkPhone', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000030', 10, 'refundSwiftNo', 6, '', NULL, '退票流水号', b'0', b'0', b'0', 100, b'1', 0, 'refundSwiftNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000031', 10, 'isAllowRefund', 6, '', NULL, '是否孕育提交退票', b'0', b'0', b'0', 10, b'1', 0, 'isAllowRefund', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000032', 10, 'jsonOtherInfo', 6, '', NULL, '其他信息', b'0', b'0', b'0', 255, b'1', 0, 'jsonOtherInfo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000033', 10, 'checkStatus', 6, '', NULL, '审批状态', b'0', b'0', b'0', 100, b'1', 0, 'checkStatus', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000034', 10, 'orderType', 6, '', NULL, '订单状态', b'0', b'0', b'0', 10, b'1', 0, 'orderType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000035', 10, 'refundPrice', 5, '', NULL, '实退金额', b'0', b'0', b'0', 100, b'1', 0, 'refundPrice', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000036', 10, 'tpPrice', 5, '', NULL, '退票费', b'0', b'0', b'0', 100, b'1', 0, 'tpPrice', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000037', 10, 'sumCounterFee', 5, '', NULL, '服务费', b'0', b'0', b'0', 100, b'1', 0, 'sumCounterFee', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000038', 10, 'carrierSumFee', 5, '', NULL, '改签总变更费', b'0', b'0', b'0', 100, b'1', 0, 'carrierSumFee', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000039', 10, 'isSupplement', 1, '', NULL, '是否补录订单', b'0', b'0', b'0', 10, b'1', 0, 'isSupplement', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000040', 10, 'verifyType', 6, '', NULL, '审批方式', b'0', b'0', b'0', 10, b'1', 0, 'verifyType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000041', 10, 'headUserName', 6, '', NULL, '责任人', b'0', b'0', b'0', 100, b'1', 0, 'headUserName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000042', 10, 'flowBaseId', 6, '', NULL, '审批规则ID', b'0', b'0', b'0', 100, b'1', 0, 'flowBaseId', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000043', 10, 'orderStatusName', 6, '', NULL, '订单状态名称', b'0', b'0', b'0', 100, b'1', 0, 'orderStatusName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000044', 10, 'trainOrderNo', 6, '', NULL, '12306订单号', b'0', b'0', b'0', 100, b'1', 0, 'trainOrderNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000045', 10, 'parentOrderNo', 6, '', NULL, '改签单/退票单原订单号', b'0', b'0', b'0', 100, b'1', 0, 'parentOrderNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000046', 10, 'applyOrderNo', 6, '', NULL, '出差审批单号', b'0', b'0', b'0', 100, b'1', 0, 'applyOrderNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000047', 10, 'fromType', 6, '', NULL, '车票来源', b'0', b'0', b'0', 100, b'1', 0, 'fromType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000048', 10, 'currency', 6, '', NULL, '结算币种', b'0', b'0', b'0', 100, b'1', 0, 'currency', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000049', 10, 'paymentType', 6, '', NULL, '支付方式', b'0', b'0', b'0', 100, b'1', 0, 'paymentType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000050', 10, 'preOrderMode', 6, '', NULL, '预订方式', b'0', b'0', b'0', 100, b'1', 0, 'preOrderMode', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000051', 10, 'relateYBZID', 6, '', NULL, '关联行程号', b'0', b'0', b'0', 100, b'1', 0, 'relateYBZID', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000052', 10, 'relateOtherID', 6, '', NULL, '关联申请单号', b'0', b'0', b'0', 100, b'1', 0, 'relateOtherID', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000053', 10, 'bxStatus', 1, '', NULL, '报销状态', b'0', b'0', b'0', 100, b'1', 0, 'bxStatus', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000054', 10, 'authStatus', 1, '', NULL, '授权状态', b'0', b'0', b'0', 100, b'1', 0, 'authStatus', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000055', 10, 'note', 6, '', NULL, '备注', b'0', b'0', b'0', 100, b'1', 0, 'note', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:20:52');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000056', 10, 'cardHolderName', 6, '', NULL, '持卡人', b'0', b'0', b'0', 100, b'1', 0, 'cardHolderName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000057', 10, 'payType', 6, '', NULL, '支付类型', b'0', b'0', b'0', 100, b'1', 0, 'payType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000000058', 10, 'travelType', 6, '', NULL, '因公因私', b'0', b'0', b'0', 100, b'1', 0, 'travelType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001001', 10, 'psgName', 6, '', NULL, '乘车人姓名', b'0', b'0', b'0', 100, b'1', 0, 'psgName', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001002', 10, 'oaUserCode', 6, '', NULL, '乘车人员工编号', b'0', b'0', b'0', 100, b'1', 0, 'oaUserCode', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001003', 10, 'ticketType', 1, '', NULL, '车票类型', b'0', b'0', b'0', 100, b'1', 0, 'ticketType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001004', 10, 'cardType', 6, '', NULL, '证件类型', b'0', b'0', b'0', 100, b'1', 0, 'cardType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001005', 10, 'cardNo', 6, '', NULL, '证件号', b'0', b'0', b'0', 100, b'1', 0, 'cardNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001006', 10, 'costCenter', 6, '', NULL, '成本中心', b'0', b'0', b'0', 100, b'1', 0, 'costCenter', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001007', 10, 'seatType', 6, '', NULL, '座位类别', b'0', b'0', b'0', 100, b'1', 0, 'seatType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001008', 10, 'trainBox', 6, '', NULL, '车厢', b'0', b'0', b'0', 100, b'1', 0, 'trainBox', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001009', 10, 'seatNo', 6, '', NULL, '座位号', b'0', b'0', b'0', 100, b'1', 0, 'seatNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001010', 10, 'tktPrice', 5, '', NULL, '票价', b'0', b'0', b'0', 100, b'1', 0, 'tktPrice', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001011', 10, 'psgStatus', 6, '', NULL, '乘客状态', b'0', b'0', b'0', 100, b'1', 0, 'psgStatus', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001014', 10, 'counterFee', 5, '', NULL, '服务费', b'0', b'0', b'0', 100, b'1', 0, 'counterFee', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001015', 10, 'carrierChangeFee', 5, '', NULL, '乘客改签变更费', b'0', b'0', b'0', 100, b'1', 0, 'carrierChangeFee', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001016', 10, 'isRuleOver', 6, '', NULL, '差旅是否超标', b'0', b'0', b'0', 100, b'1', 0, 'isRuleOver', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001017', 10, 'noTravelRules', 6, '', NULL, '不符合差旅项', b'0', b'0', b'0', 100, b'1', 0, 'noTravelRules', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001018', 10, 'psgNo', 6, '', NULL, '旅客编号', b'0', b'0', b'0', 100, b'1', 0, 'psgNo', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001019', 10, 'isCusPsg', 6, '', NULL, '是否常旅客', b'0', b'0', b'0', 100, b'1', 0, 'isCusPsg', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001020', 10, 'personMobile', 6, '', NULL, '旅客电话', b'0', b'0', b'0', 100, b'1', 0, 'personMobile', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001021', 10, 'userId', 1, '', NULL, '人员唯一ID', b'0', b'0', b'0', 100, b'1', 0, 'userId', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001022', 10, 'psgPosition', 6, '', NULL, '乘车人职级', b'0', b'0', b'0', 100, b'1', 0, 'psgPosition', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001023', 10, 'sumInsMoney', 5, '', NULL, '保险费', b'0', b'0', b'0', 100, b'1', 0, 'sumInsMoney', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001024', 10, 'sendTicketFee', 5, '', NULL, '送票费/快递费', b'0', b'0', b'0', 100, b'1', 0, 'sendTicketFee', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001025', 10, 'costCenter2', 6, '', NULL, '成本中心2', b'0', b'0', b'0', 100, b'1', 0, 'costCenter2', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001026', 10, 'costCenter3', 6, '', NULL, '成本中心3', b'0', b'0', b'0', 100, b'1', 0, 'costCenter3', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001027', 10, 'department1', 6, '', NULL, '部门1', b'0', b'0', b'0', 100, b'1', 0, 'department1', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:30:26');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001028', 10, 'department2', 6, '', NULL, '部门2', b'0', b'0', b'0', 100, b'1', 0, 'department2', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:30:31');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001029', 10, 'department3', 6, '', NULL, '部门3', b'0', b'0', b'0', 100, b'1', 0, 'department3', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:30:34');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001030', 10, 'ticketsType', 6, '', NULL, '车票类型', b'0', b'0', b'0', 100, b'1', 0, 'ticketsType', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');
INSERT INTO `cnv_attribute` VALUES ('G001ZM0000TRAINORDER0000000000001031', 10, 'paperTicketFee', 5, '', NULL, '纸质票出票费', b'0', b'0', b'0', 100, b'1', 0, 'paperTicketFee', NULL, NULL, NULL, 'G001ZM0000BRIGADEENTITY0000000000020', NULL, NULL, NULL, '2018-08-27 14:52:05');

-- 转换平台数据建模
DROP TABLE IF EXISTS `cnv_outentitydef`;
CREATE TABLE `cnv_outentitydef`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `billtypecode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '单据类型编码',
  `relentity` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联实体ID',
  `rootnode` bit(1) NULL DEFAULT NULL COMMENT '是否根节点',
  `systemcode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编码',
  `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8;

INSERT INTO `cnv_outentitydef` VALUES ('G001ZM0000OUTENTITYDEF00000000000111', 'brigade_flight', 'G001ZM0000BILLTYPE000000000000000020', b'1', NULL, '2018-08-27 11:35:21');
INSERT INTO `cnv_outentitydef` VALUES ('G001ZM0000OUTENTITYDEF00000000000112', 'brigade_train', 'G001ZM0000BRIGADEENTITY0000000000020', b'1', NULL, '2018-08-27 11:38:27');
INSERT INTO `cnv_outentitydef` VALUES ('G001ZM0000OUTENTITYDEF00000000000113', 'brigade_hotel', 'G001ZM0000BRIGADEENTITY0000000000030', b'1', NULL, '2018-08-31 12:52:44');

DROP TABLE IF EXISTS `cnv_outpropertydef`;
CREATE TABLE `cnv_outpropertydef`  (
  `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `assemblytype` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组合方式',
  `datatype` int(11) NULL DEFAULT NULL COMMENT '数据类型',
  `outeridentifier` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '外部标识',
  `propertycode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性编码',
  `propertyname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性名称',
  `refouterentity` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联外部实体',
  `rownumber` int(11) NOT NULL DEFAULT 0,
  `outerentityid` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '外部实体ID',
  `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8;

DROP TABLE if EXISTS bri_rtpnrpri;
CREATE TABLE `bri_rtpnrpri` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tenant` varchar(20) DEFAULT '' COMMENT '租户ID',
  `orgpk` varchar(40) DEFAULT '' COMMENT '组织PK',
  `rtpnrPriUrl` varchar(200) DEFAULT '' COMMENT '中航易购私有化部署URL',
  `tmcid` varchar(20) DEFAULT NULL COMMENT 'TMCID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DROP TABLE if EXISTS ctrip_bc_user;
create table ctrip_bc_user(
id int primary key auto_increment,
user_id varchar(64) default '' comment '用户userId',
org varchar(64) default '' comment '组织信息',
tenant varchar(20) default '' comment '租户ID',
uid char(20) default '' comment '员工的携程卡号',
employee_id varchar(100) default '' comment '员工编号',
`name` varchar(80) default '' comment '用户姓名',
mobile_phone varchar(20) default '' comment '手机号码',
email varchar(60) default '' comment '邮箱',
valid char(1) default '' comment '在职情况 A 在职 I离职',
rank varchar(50) default '' comment '职级',
rank_name varchar(200) default '' comment '职级名称',
corporation_id varchar(100) default '' comment '公司ID，由携程方提供',
dept1 varchar(100) default '' comment '部门1',
dept2 varchar(100) default '' comment '部门2',
dept3 varchar(100) default '' comment '部门3',
dept4 varchar(100) default '' comment '部门4',
subaccount_name varchar(100) default '' comment '子账户名称',
corp_card_type char(1) default '' comment '代订类型 C（个人卡），B（代订卡）：代订范围默认整个公司，D（虚卡）',
res_range char(1) default '' comment '代订范围：当前用户可代订范围  C：公司、F：主账户及其他、S：子账户及其他、O：其他（根据代订关系配置）；（当代订类型为B（代订卡）时，代订范围不能为空）',
is_book_class char(1) default '' comment '国内机票两舱是否可预订：T:是，F：否',
intl_book_class_block varchar(200)  default '' comment '国际屏蔽舱位控制：C（公务），F（头等），Y（经济），SY（超经）。可传多个值，每个用英文";"隔开（如：C;F;SY）如需清空该字段，传字符串"null"',
is_send_email varchar(10) default '' comment '是否发送开通邮件，true=是，false=否；',
use_tr_flag int default 0 comment '设置不可帮非员工预订产品类型，多个则将其对应数字相加1（国内机票），2（国际机票），4（酒店），8（用车），16（火车票）例如：17，不可帮非员工预订国内机票和火车票如需清空该字段，传值-1',
ts timestamp not null default current_timestamp on update current_timestamp
);

drop table if EXISTS third_property;
create table third_property(
id int primary key auto_increment,
`key` varchar(50) default '' comment '键',
`value` varchar(100) default '' comment '值',
type varchar(20) default '' comment '字段类型',
channel varchar(20) default '' comment '第三方类型',
tenant varchar(20) default '' comment '租户ID',
org_pk varchar(64) default '' comment '组织PK',
ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

drop table if EXISTS ctrip_sme_user;
CREATE TABLE `ctrip_sme_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` varchar(64) DEFAULT '' COMMENT '用户userId',
  `tenant` varchar(20) DEFAULT '' COMMENT '租户ID',
  `org` varchar(64) DEFAULT '' COMMENT '组织信息',
  `employee_id` varchar(100) DEFAULT '' COMMENT '员工编号',
  `name` varchar(80) DEFAULT '' COMMENT '用户姓名',
  `mobile` varchar(20) DEFAULT '' COMMENT '手机号码',
  `email` varchar(60) DEFAULT '' COMMENT '邮箱',
  `a_manager` tinyint(4) DEFAULT '0' COMMENT '是否管理员',
  `has_booking_for_other` tinyint(4) DEFAULT '0' COMMENT '是否代订人 是true 否false',
  `birthday` date DEFAULT NULL COMMENT '生日',
  `first_name` varchar(50) DEFAULT '' COMMENT '外籍/港澳台人士FirstName',
  `last_name` varchar(50) DEFAULT '' COMMENT '	外籍/港澳台人士LastName',
  `valid` tinyint(4) DEFAULT '1' COMMENT '是否正在使用',
  `dept1` varchar(100) DEFAULT '' COMMENT '部门1',
  `dept2` varchar(100) DEFAULT '' COMMENT '部门2',
  `cost1` varchar(100) DEFAULT '' COMMENT '成本中心1',
  `gender` char(1) DEFAULT '0' COMMENT '性别：2男性,1女性,0未知',
  `nationality` varchar(50) DEFAULT '' COMMENT '国籍',
  `superior_EID` varchar(50) DEFAULT '' COMMENT '上级领导EID',
  `cust_ID` varchar(50) DEFAULT '' COMMENT '客户提供的组织部门ID',
  `ts` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `ctrip_group`;
CREATE TABLE `ctrip_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '组ID，主键自增',
  `name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '组名称',
  `note` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '备注',
  `tenantid` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

DROP TABLE IF EXISTS `ctrip_group_member`;
CREATE TABLE `ctrip_group_member` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户ID',
  `tenantid` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '租户id',
  `pcode` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户编号',
  `email` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '邮箱',
  `depart` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '部门',
  `phone` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '手机号',
  `groupid` int(11) DEFAULT '0' COMMENT '组ID',
  `username` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户名称',
  `note` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '备注',
  `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `convert_template_mapping` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `convert_column` varchar(50) NOT NULL COMMENT '转换数据字段编码',
  `template_column` varchar(50) NOT NULL COMMENT '模板字段编码',
  `creator` varchar(36) DEFAULT NULL COMMENT '创建人',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

INSERT INTO `convert_template_mapping` VALUES (1, 'fromCity', 'from_city', NULL, NULL, '2019-01-28 18:08:41');
INSERT INTO `convert_template_mapping` VALUES (2, 'toCity', 'to_city', NULL, NULL, '2019-01-28 18:08:56');
INSERT INTO `convert_template_mapping` VALUES (3, 'travelway', 'travel_way', NULL, NULL, '2019-02-14 17:35:59');
INSERT INTO `convert_template_mapping` VALUES (4, 'tagContent', 'tag_content', NULL, NULL, '2019-02-15 13:50:00');
INSERT INTO `convert_template_mapping` VALUES (5, 'date', 'travel_date', NULL, NULL, '2019-02-26 12:58:39');
INSERT INTO `convert_template_mapping` VALUES (6, 'invoiceNumber', 'invoicenum', NULL, NULL, '2019-03-12 18:54:01');
INSERT INTO `convert_template_mapping` VALUES (7, 'startDate', 'start_date', NULL, NULL, '2019-03-12 18:58:39');
INSERT INTO `convert_template_mapping` VALUES (8, 'endDate', 'end_date', NULL, NULL, '2019-03-12 18:58:53');
INSERT INTO `convert_template_mapping` VALUES (9, 'date', 'other_date', NULL, NULL, '2019-03-12 19:00:29');
INSERT INTO `convert_template_mapping` VALUES (10, 'date', 'communicate_date', NULL, NULL, '2019-03-12 19:08:56');
INSERT INTO `convert_template_mapping` VALUES (11, 'date', 'eating_date', NULL, NULL, '2019-03-12 19:13:27');
INSERT INTO `convert_template_mapping` VALUES (12, 'date', 'communicate_start', NULL, NULL, '2019-03-12 19:17:41');
INSERT INTO `convert_template_mapping` VALUES (13, 'date', 'communicate_end', NULL, NULL, '2019-03-12 19:17:42');
INSERT INTO `convert_template_mapping` VALUES (14, 'seatPk', 'seatpk', NULL, NULL, '2019-04-26 10:00:40');
INSERT INTO `convert_template_mapping` VALUES (15, 'szitemPk', 'szitem_pk', NULL, NULL, '2019-04-26 10:03:27');
INSERT INTO `convert_template_mapping` VALUES (16, 'itemPk', 'item_pk', NULL, NULL, '2019-04-26 10:03:35');

DROP TABLE IF EXISTS `bri_channel_base`;
CREATE TABLE `bri_channel_base` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_code` varchar(64) DEFAULT '' COMMENT '商旅系统代码',
  `channel_name` varchar(64) DEFAULT '' COMMENT '商旅系统名称',
  `icon_code` varchar(64) DEFAULT '' COMMENT '图标代码',
  `config` varchar(255) DEFAULT '' COMMENT '配置字段',
  `account_config` varchar(255) DEFAULT '' COMMENT '结算配置',
  `model` varchar(2) DEFAULT '' COMMENT '开户模式',
  `instruction` varchar(255) DEFAULT '' COMMENT '填写说明',
  `valid` int(11) DEFAULT 1 COMMENT '是否启用',
  `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4;

DROP TABLE IF EXISTS `bri_icon`;
CREATE TABLE `bri_icon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `channel_code` varchar(64) DEFAULT '' COMMENT '商旅系统代码',
  `icon_name` varchar(64) DEFAULT '' COMMENT '入口名称',
  `icon` varchar(64) DEFAULT '' COMMENT '图标文件名称',
  `sequence` int(11) DEFAULT 1 COMMENT '入口排序',
  `icon_key` varchar(64) DEFAULT '' COMMENT '入口key',
  `valid` int(11) DEFAULT 1 COMMENT '是否启用',
  `is_root` int(11) DEFAULT 1 COMMENT '是否为根图标',
  `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

DROP TABLE IF EXISTS `hz_user`;
CREATE TABLE `hz_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tenant` varchar(255) DEFAULT '' COMMENT '租户id',
  `person_code` varchar(64) DEFAULT '' COMMENT '员工编号',
  `employee_name` varchar(255) DEFAULT '' COMMENT '员工姓名',
  `certificates_type` varchar(255) DEFAULT '' COMMENT '证件类型：C01 居民身份证（内宾）\r\nC02 户口薄（内宾）\r\nC03 军官证（内宾）\r\nC04 警官证（内宾）\r\nC05 士兵证（内宾）\r\nC06 护照\r\nC54 中华人民共和国旅行证\r\nC55 台湾居民来往大陆通行证\r\nC59 中华人民共和国入出境通行证\r\nC62 港澳居民来往内地通行证\r\nC65 驾驶证',
  `certificates_number` varchar(255) DEFAULT '' COMMENT '证件号',
  `phone` varchar(255) DEFAULT '' COMMENT '手机号',
  `valid` varchar(1) DEFAULT '1' COMMENT '是否有效，0无效1有效',
  `ts` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

CREATE TABLE `bfjr_user` (
  `id` int(64) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `tenant` varchar(255) DEFAULT NULL COMMENT '租户id',
  `appId` varchar(255) NOT NULL COMMENT '商户唯一标识',
  `expEmpId` varchar(255) NOT NULL COMMENT '外部系统员工ID',
  `empName` varchar(255) NOT NULL COMMENT '员工姓名',
  `empGender` varchar(255) NOT NULL COMMENT '员工性别',
  `empDeptId` varchar(255) DEFAULT NULL COMMENT '员工部门编码',
  `expEmpDeptId` varchar(255) DEFAULT NULL COMMENT '员工外部系统部门编码',
  `traPlcName` varchar(255) NOT NULL COMMENT '差旅政策名称',
  `mobileNo` varchar(255) NOT NULL COMMENT '手机号',
  `uEmail` varchar(255) DEFAULT NULL COMMENT '邮箱',
  `telNo` varchar(255) DEFAULT NULL COMMENT '固定电话',
  `countryCode` varchar(255) DEFAULT NULL COMMENT '国籍',
  `cardNo` varchar(255) DEFAULT NULL COMMENT '身份证号',
  `passportNo` varchar(255) DEFAULT NULL COMMENT '护照号',
  `laissezNo` varchar(255) DEFAULT NULL COMMENT '港澳证件号',
  `otherNo` int(64) DEFAULT NULL COMMENT '其它证件号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

CREATE TABLE `bfjr_dept` (
  `id` int(64) NOT NULL AUTO_INCREMENT,
  `appId` varchar(64) DEFAULT NULL,
  `deptName` varchar(255) DEFAULT NULL,
  `expDeptId` varchar(64) DEFAULT NULL,
  `tenant` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;